Skip to content

Password change#655

Merged
aguingand merged 8 commits into
mainfrom
password-change
Nov 10, 2025
Merged

Password change#655
aguingand merged 8 commits into
mainfrom
password-change

Conversation

@dvlpp
Copy link
Copy Markdown
Member

@dvlpp dvlpp commented Oct 30, 2025

Adds an helper (trait) to simplify the creation of a password change command

@dvlpp dvlpp requested a review from Copilot October 31, 2025 10:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a reusable trait for building password change commands in Sharp. It provides a standardized way for authenticated users to change their own passwords with configurable validation rules, optional password confirmation, and built-in rate limiting protection.

  • Adds IsChangePasswordCommandTrait with configurable password change functionality
  • Implements rate limiting (3 attempts) with localized error messages
  • Updates demo application to use the new trait instead of custom implementation

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/Auth/Password/Command/IsChangePasswordCommandTrait.php New trait providing password change form fields, validation rules, and rate limiting
tests/Http/Auth/ChangePasswordCommandTraitTest.php Comprehensive test coverage for all trait features including rate limiting, confirmation, and validation
resources/lang/en/auth.php English translations for password change command labels and messages
resources/lang/fr/auth.php French translations for password change command labels and messages
docs/guide/authentication.md Documentation explaining trait usage with configuration examples
demo/app/Sharp/Profile/ProfileSingleShow.php Updated to use new command class and modernized array syntax
demo/app/Sharp/Profile/Commands/UpdateProfilePasswordCommand.php Removed legacy custom implementation
demo/app/Sharp/Profile/Commands/ChangePasswordCommand.php New demo implementation using the trait

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/guide/authentication.md Outdated
Comment thread docs/guide/authentication.md
Comment thread docs/guide/authentication.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@aguingand aguingand merged commit 5b1dd95 into main Nov 10, 2025
5 checks passed
@aguingand aguingand deleted the password-change branch April 30, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants